<script>
	export default {
		//App.vue
		onLaunch: function(option) {

		},
		onShow: function() {
			console.log('App Show')
			var that = this;
			uni.login({
				provider: 'weixin', //使用微信登录
				success: function(loginRes) {
					console.log('loginRes', loginRes.code);
					that.ran
						.request('index/Wxchat/index', {
							code: loginRes.code
						})
						.then(res => {
							if (res.code == 0) {
								uni.setStorageSync('uid', res.data.id);
							}
						});
				}
			});
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	page {
		background: #f8f8f8;
	}

	/*每个页面公共css */
	.publicolor {
		color: #2979ff;
	}

	.textr {
		text-align: right;
	}

	.status_bar {
		background: #2979ff;
	}
</style>